package com.sora.cmsservice.controller;

import com.sora.cmsservice.entity.CrmBanner;
import com.sora.cmsservice.service.CrmBannerService;
import com.sora.commonutils.R;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @Classname: BannerFrontController
 * @Description:
 * @Author: Stonffe
 * @Date: 2023/1/11 14:35
 */
@RestController
@RequestMapping("/cmsservice/bannerfront")
@CrossOrigin
public class BannerFrontController {
    @Autowired
    private CrmBannerService bannerService;
    @GetMapping("getAll")
    public R getAll() {
        List<CrmBanner> list = bannerService.getALlBanner();
        return R.ok().data("list",list);
    }
}
